package com.m.springblog.mapper;

import com.m.springblog.model.Result;
import com.m.springblog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {
    /**
     * 根据用户名, 查询用户信息
     */
    @Select("select * from user_info where user_name = #{userName} and delete_flag = 0")
    UserInfo queryByName(String userName);

    /**
     * 根据用户ID, 查询用户信息
     */
    @Select("select * from user_info where id = #{id} and delete_flag = 0")
    UserInfo querById(Integer id);
}
